import {useContext} from "react"
import ContextTO from "./context_js"
//const 
const Context_one =()=>{
    const context=useContext(ContextTO)
    console.log('context初始值',context)
    return(
        <div>
            <h1>子组件1，使用hook获取context:</h1>
            <div>
                {
                    context.todoList.map(
                        (item,index)=>{
                          
                            <p key={index}>
                              标题：  {item.title}
                              优先级：{item.level}
                            </p>
                        }
                    )
                }
            </div>
        </div>
    )
}

export default Context_one;